package com.data.common.aspect;


import cn.hutool.core.lang.UUID;
import com.alibaba.druid.support.json.JSONParser;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.data.common.api.CommonAPI;
import com.data.common.aspect.annotation.DataAuditLogging;
import com.data.common.entity.OperationDataChange;
import com.data.common.util.CompareObjUtil;
import com.data.common.util.DataOperateLogThreadLocal;
import com.data.modules.base.service.BaseCommonService;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * CG
 */
@SuppressWarnings("ALL")
@Slf4j
@Aspect
@Component
public class DataAuditLogAspect {

    @Lazy
    @Autowired
    private BaseCommonService logApi;
    /**
     * 数据审核日志切面前执行
     * @param joinPoint
     * @param dataLog
     */
    @Before("@annotation(dataLog)")
    public void beforeDataAuditLogging(JoinPoint joinPoint, DataAuditLogging dataLog) {
        Object obj = DataOperateLogThreadLocal.THREADDATA_ID.get();
        if(obj == null){
            obj =  UUID.fastUUID().toString();
        }

        DataOperateLogThreadLocal.THREADDATA_ID.set(obj.toString());
        MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
        String ClassName =  methodSignature.getDeclaringTypeName();
        DataOperateLogThreadLocal.THREADDATA_METHOD.set(ClassName+"#"+joinPoint.getSignature().getName());
        DataOperateLogThreadLocal.DATA_CHANGES.set(new LinkedList<>());
        DataOperateLogThreadLocal.JOIN_POINT.set(joinPoint);
        DataOperateLogThreadLocal.DATA_LOG.set(dataLog);
    }

    /**
     * 数据审计日志切面后执行
     * @param dataLog
     */
    @AfterReturning("@annotation(dataLog)")
    public void afterDataAuditLogging(DataAuditLogging dataLog) {
        try{
            List<OperationDataChange> list = DataOperateLogThreadLocal.DATA_CHANGES.get();
            if (CollectionUtils.isEmpty(list)) {
                return;
            }
            list.forEach(change -> {
                List<?> oldData = change.getOldData();
                if (CollectionUtils.isEmpty(oldData)) {
                    return;
                }
                if(change.getEntityType() == null){
                    //按 map处理
                    List<Map<String, Object>> maps = change.getJdbcTemplate().queryForList(change.getQuerySql());
                    change.setNewData(maps);
                }else{
                    //按对象处理
                    try {
                        String clzzName = change.getEntityType().getName();
                        Class<?> clazz = Class.forName(clzzName);
                        List<?> newList = change.getJdbcTemplate().query(change.getQuerySql(),new BeanPropertyRowMapper<>(clazz));
                        change.setNewData(newList);
                    } catch (Exception e) {
                    }
                }
                //置空 jdbc
                change.setJdbcTemplate(null);
            });
            //TODO 实现写入 DB
            logApi.compareAndTransfer(list);
        }catch (Exception e){
            log.info("数据审计日志记录失败");
            log.error(e.getMessage(),e);
        }
    }


    public static void main(String[] args){
        String str = "[{\"querySql\":\"select id,name,key_word,punch_time,sex,age,birthday,content,tenant_id,sys_org_code,create_by,create_time,update_by,update_time from demo where  tenant_id = 0 AND id = '1353563050407936002'\",\"transferData\":[{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"name\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"name\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"name\",\"column\":\"name\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"姓名\",\"width\":25.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"姓名\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"name\",\"annotations\":[{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"姓名\",\"width\":25.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"姓名\"}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"name,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"key_word\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"keyWord\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"keyWord\",\"column\":\"key_word\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"关键词\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"关键词\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"keyWord\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"关键词\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"关键词\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"key_word,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"punch_time\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.util.Date\",\"property\":\"punchTime\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"punchTime\",\"column\":\"punch_time\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"打卡时间\"},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"打卡时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.util.Date\"},\"enumConstant\":false,\"name\":\"punchTime\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"打卡时间\"},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"打卡时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.util.Date\",\"modifiers\":2,\"type\":\"java.util.Date\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"punch_time,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"salary_money\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.math.BigDecimal\",\"property\":\"salaryMoney\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"salaryMoney\",\"column\":\"salary_money\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"工资\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"工资\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.math.BigDecimal\"},\"enumConstant\":false,\"name\":\"salaryMoney\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"工资\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"工资\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.math.BigDecimal\",\"modifiers\":2,\"type\":\"java.math.BigDecimal\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"salary_money,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"bonus_money\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.Double\",\"property\":\"bonusMoney\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"bonusMoney\",\"column\":\"bonus_money\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"奖金\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"奖金\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.Double\"},\"enumConstant\":false,\"name\":\"bonusMoney\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"奖金\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"奖金\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.Double\",\"modifiers\":2,\"type\":\"java.lang.Double\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"bonus_money,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"sex\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"sex\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"sex\",\"column\":\"sex\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"性别\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"sex\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"性别\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"sex\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"性别\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"sex\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"性别\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"sex,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"age\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.Integer\",\"property\":\"age\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"age\",\"column\":\"age\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"年龄\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"年龄\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.Integer\"},\"enumConstant\":false,\"name\":\"age\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"0\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"年龄\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"年龄\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.Integer\",\"modifiers\":2,\"type\":\"java.lang.Integer\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"age,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"birthday\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.util.Date\",\"property\":\"birthday\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"birthday\",\"column\":\"birthday\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"生日\"},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd\",\"style\":\"SS\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"生日\",\"width\":10.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.util.Date\"},\"enumConstant\":false,\"name\":\"birthday\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"生日\"},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd\",\"style\":\"SS\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"生日\",\"width\":10.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.util.Date\",\"modifiers\":2,\"type\":\"java.util.Date\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"birthday,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"email\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"email\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"email\",\"column\":\"email\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"邮箱\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"邮箱\",\"width\":30.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"email\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"邮箱\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"邮箱\",\"width\":30.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"email,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"content\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"content\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"content\",\"column\":\"content\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"个人简介\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"content\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"个人简介\"}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"content,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"tenant_id\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.Integer\",\"property\":\"tenantId\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"tenantId\",\"column\":\"tenant_id\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"租户ID\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.Integer\"},\"enumConstant\":false,\"name\":\"tenantId\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"租户ID\"}],\"genericType\":\"java.lang.Integer\",\"modifiers\":2,\"type\":\"java.lang.Integer\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"tenant_id,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"sys_org_code\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"sysOrgCode\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"sysOrgCode\",\"column\":\"sys_org_code\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"部门编码\",\"width\":25.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"部门编码\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"sysOrgCode\",\"annotations\":[{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"部门编码\",\"width\":25.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"部门编码\"}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.modules.demo.test.entity.BootDemo\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"sys_org_code,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"create_by\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"createBy\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"createBy\",\"column\":\"create_by\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"创建人\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"创建人\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"createBy\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"创建人\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"创建人\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.common.system.base.entity.BootEntity\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"create_by,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"create_time\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.util.Date\",\"property\":\"createTime\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"createTime\",\"column\":\"create_time\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"创建时间\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"创建时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.util.Date\"},\"enumConstant\":false,\"name\":\"createTime\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"创建时间\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"创建时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"}],\"genericType\":\"java.util.Date\",\"modifiers\":2,\"type\":\"java.util.Date\",\"declaringClass\":\"com.data.common.system.base.entity.BootEntity\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"create_time,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":true,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"update_by\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.lang.String\",\"property\":\"updateBy\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"updateBy\",\"column\":\"update_by\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"更新人\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"更新人\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.lang.String\"},\"enumConstant\":false,\"name\":\"updateBy\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"更新人\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"更新人\",\"width\":15.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true}],\"genericType\":\"java.lang.String\",\"modifiers\":2,\"type\":\"java.lang.String\",\"declaringClass\":\"com.data.common.system.base.entity.BootEntity\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"update_by,\",\"fieldFill\":\"DEFAULT\"},{\"select\":true,\"charSequence\":false,\"primitive\":false,\"orderBy\":false,\"sqlSelect\":\"update_time\",\"whereStrategy\":\"NOT_NULL\",\"propertyType\":\"java.util.Date\",\"property\":\"updateTime\",\"withInsertFill\":false,\"insertStrategy\":\"NOT_NULL\",\"logicDelete\":false,\"orderBySort\":0,\"el\":\"updateTime\",\"column\":\"update_time\",\"version\":false,\"updateStrategy\":\"NOT_NULL\",\"condition\":\"%s=#{%s}\",\"field\":{\"accessible\":true,\"declaredAnnotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"更新时间\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"更新时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"}],\"synthetic\":false,\"annotatedType\":{\"declaredAnnotations\":[],\"annotations\":[],\"type\":\"java.util.Date\"},\"enumConstant\":false,\"name\":\"updateTime\",\"annotations\":[{\"access\":\"\",\"notes\":\"\",\"hidden\":false,\"dataType\":\"\",\"readOnly\":false,\"accessMode\":\"AUTO\",\"required\":false,\"example\":\"\",\"reference\":\"\",\"extensions\":[{\"name\":\"\",\"properties\":[{\"name\":\"\",\"value\":\"\"}]}],\"allowableValues\":\"\",\"allowEmptyValue\":false,\"name\":\"\",\"position\":0,\"value\":\"更新时间\"},{\"numFormat\":\"\",\"replace\":[],\"orderNum\":\"0\",\"type\":1,\"suffix\":\"\",\"multiReplace\":true,\"exportConvert\":false,\"importFormat\":\"\",\"mergeVertical\":false,\"imageType\":3,\"height\":10.0,\"mergeRely\":[],\"dicCode\":\"\",\"needMerge\":false,\"dictTable\":\"\",\"format\":\"yyyy-MM-dd HH:mm:ss\",\"databaseFormat\":\"yyyyMMddHHmmss\",\"isStatistics\":false,\"groupName\":\"\",\"isColumnHidden\":false,\"savePath\":\"upload\",\"importConvert\":false,\"name\":\"更新时间\",\"width\":20.0,\"dicText\":\"\",\"exportFormat\":\"\",\"isWrap\":true},{\"with\":[],\"shape\":\"ANY\",\"timezone\":\"GMT+8\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"locale\":\"##default\",\"lenient\":\"DEFAULT\",\"without\":[]},{\"iso\":\"NONE\",\"pattern\":\"yyyy-MM-dd HH:mm:ss\",\"style\":\"SS\"}],\"genericType\":\"java.util.Date\",\"modifiers\":2,\"type\":\"java.util.Date\",\"declaringClass\":\"com.data.common.system.base.entity.BootEntity\"},\"withUpdateFill\":false,\"insertSqlColumn\":\"update_time,\",\"fieldFill\":\"DEFAULT\"}],\"oldData\":[{\"birthday\":\"2021-01-25\",\"tenant_id\":0,\"sys_org_code\":\"A01\",\"create_time\":1611504000000,\"punch_time\":1611590400000,\"sex\":\"2\",\"key_word\":\"44\",\"content\":\"个人简介必填\",\"create_by\":\"admin\",\"update_time\":1666421512000,\"name\":\"小红帽小\",\"id\":\"1353563050407936002\",\"update_by\":\"admin\",\"age\":22}],\"whereSql\":\" tenant_id = 0 AND id = '1353563050407936002'\",\"entityType\":\"com.data.modules.demo.test.entity.BootDemo\",\"newData\":[{\"birthday\":\"2021-01-25\",\"tenant_id\":0,\"sys_org_code\":\"A01\",\"create_time\":1611504000000,\"punch_time\":1611590400000,\"sex\":\"2\",\"key_word\":\"44\",\"content\":\"a个人简介必填\",\"create_by\":\"admin\",\"update_time\":1666490205000,\"name\":\"小红帽小\",\"id\":\"1353563050407936002\",\"update_by\":\"admin\",\"age\":22}],\"tableName\":\"demo\"}]";
        JSONArray list = JSON.parseArray(str);
        JSONObject obj = (JSONObject) list.get(0);
        OperationDataChange change = JSONObject.parseObject(obj.toJSONString(),OperationDataChange.class);

        Class<?> entityType = change.getEntityType();
        if(entityType == null){
            String name =  obj.getString("entityType");
            log.info("name:{}",JSON.toJSON(name));
        }
        String od = JSON.toJSONString(change.getOldData().get(0));
        log.info("od:{}",JSON.toJSON(od));
        String nd = JSON.toJSONString(change.getNewData().get(0));
        log.info("nd:{}",nd);

        String result = CompareObjUtil.campareJsonObject(od, nd);
        log.info(result);

    }

}

